#ifndef __DKGL_DRAWABLE_H__
#define __DKGL_DRAWABLE_H__

#include "dkglString.h"
#include "dkglFwdDec.h"

namespace DKGL
{
    class Drawable
    {
    public:

        Drawable(const String&);

        virtual ~Drawable();

        void render();

        virtual void renderImpl();


        void setWorldTransformation(const float*mv);

        inline void show(bool b = true)
        { _show = b; }

        inline bool isShow() const
        { return _show; }

		void enableBounding()
		{
			_bounding = _constructBounding();
		}

		void disbleBounding()
		{
			_deconstructBounding(_bounding);
			_bounding = NULL;
		}

		void showBounding(bool b = true);

		inline bool isShowBounding() const
		{
			return _showBounding;
		}
	    
    protected:

		virtual bounding::Bounding* _constructBounding() = 0;
		virtual void _deconstructBounding(bounding::Bounding*) = 0;
		

        String  _name;
        bool    _show;
		bool	_showBounding;
        float   _worldTransformation[16];

		bounding::Bounding* _bounding;

    private:

        Drawable();

    };
}

#endif